<?php
	
	require_once('inc/fen_fns.php');
	
	sec_session_start();
	
	$form_values = $_POST;
	
	/*
	 
	echo $_POST['check16'];
	
	
	$size = sizeof($form_values);
	echo $size."<br>";

	for ($i=0; $i<$size; $i++) {
		echo $_POST['check'.$i]."<br>";
	}
	
	print_r($form_values);
	
	$i = 16;
	echo $_POST['check'.$i];
	
	
	foreach($form_values as $x=>$x_value)
	{
		echo "Key=" . $x . ", Value=" . $x_value;
		echo "<br>";
	}
	*/
	
	
	$query = $_DB->Query("select id from fen_members WHERE `fen_members`.`username` = '".$_SESSION['username']."'");	
	$user_id = $_DB->GetResultValue($query, "0", "id");
	
	foreach($form_values as $x=>$x_value)
	{	
		
		$delete = substr($x_value,2);
		$query = $_DB->Query("DELETE FROM `buzeb`.`fen_publications` WHERE `fen_publications`.`member_id` = '$user_id' and `fen_publications`.`id` = '$delete'");
	}
	

	
